package cn.dnui_wwt524.dnuifood_16110100524.model;

import cn.dnui_wwt524.dnuifood_16110100524.iface.BuyIface;
import cn.dnui_wwt524.dnuifood_16110100524.listener.OnRetrofitListener;
import cn.dnui_wwt524.dnuifood_16110100524.service.BuyService;
import retrofit2.Call;

public class BuyModel extends BaseModel implements BuyIface {
    private BuyService buyService;

    public BuyModel(){
        super();
        buyService = retrofit.create(BuyService.class);
    }
    @Override
    public void insertOrder(String user_id, String food_id, String num, String sum, String suggesttime, String address, OnRetrofitListener listener) {
        Call call = buyService.insertOrder(user_id,food_id,num,sum,suggesttime,address);
        bindCallBack(call,listener,1);
    }
}
